import React from 'react';
import { Route , Redirect } from 'react-router-dom';

const AuthRoute = (props) => {
    if(!localStorage.getItem('user')) {
        return <Redirect to='/login' />
    }
    return <Route {...props} />
};

export default AuthRoute;